package com.tao.ifdemo2;

import java.util.Scanner;

public class IfDemo12 {
    public static void main(String[] args) {
        double stu1, stu2, stu3, stu4, stu5;
        System.out.println("输入5个学生成绩");
        Scanner input = new Scanner(System.in);
        stu1 = input.nextDouble();
        stu2 = input.nextDouble();
        stu3 = input.nextDouble();
        stu4 = input.nextDouble();
        stu5 = input.nextDouble();
        double sum = stu1 + stu2 + stu3 + stu4 + stu5;
        System.out.println("sum = " + sum);
    }
}
